<?php
namespace Home\Controller;
class MapController extends CommonController {

    public function index() {
     $Dao = M('shop');
		$json="";
        $lists = $Dao->select();
        foreach ($lists as $k => $value) {
			$json=$json.',['.$value[id].',\''.$value[name].'\',\''.$value[logo].'\','.$value[gis_x].','.$value[gis_y].',\''.$value[announce].'\',\''.$value[addr].'\',\''.$value[phone].'\']';
        }
    $maps_data_str='['.substr($json,1).']';
        $this->assign("maps_data_str", $maps_data_str);
//        print_r($maps_data_str);
        $this->display();
    }
   

}